<template>
  <transition name="el-zoom-in-center">
    <div class="cu-preview-main records">
      <div class="cu-common-page-header">
        <el-page-header @back="goBack" :content="'流水明细'" />
      </div>
      <el-col :span="24">
        <custom-table v-loading="loading" :data="list">
          <el-table-column prop="paymentDate" label="收款日期" align="center" width="120" :formatter="custom.tableDateFormat" />
          <el-table-column prop="amount" label="收款金额" align="right" width="80"></el-table-column>
          <el-table-column prop="paymentMethod" label="收款方式" align="center" width="100">
            <template slot-scope="scope">
              {{ scope.row.paymentMethod | dynamicText(methodOptions) }}
            </template>
          </el-table-column>
          <el-table-column prop="flowState" label="审核状态" align="center" width="100">
            <template slot-scope="scope">
              <el-tag v-if="scope.row.flowState == 1">等待审核</el-tag>
              <el-tag type="success" v-else-if="scope.row.flowState == 2">审核通过</el-tag>
              <el-tag type="danger" v-else-if="scope.row.flowState == 3">审核驳回</el-tag>
              <el-tag type="danger" v-else-if="scope.row.flowState == 4">流程撤回</el-tag>
              <el-tag type="warning" v-else-if="scope.row.flowState == 5">审核终止</el-tag>
            </template>
          </el-table-column>
          <el-table-column prop="createTime" label="提交时间" align="center" :formatter="custom.tableDateTimeFormat"></el-table-column>
          <el-table-column prop="createUserName" label="提交人" align="center"></el-table-column>
          <el-table-column label="操作" fixed="right" width="180" align="center">
            <template slot-scope="scope">
              <el-button type="text" @click="addOrUpdateHandle(scope.row, scope.row.flowState)" :disabled="[1, 2, 5].indexOf(scope.row.flowState) > -1">编辑</el-button>
            </template>
          </el-table-column>
        </custom-table>
      </el-col>
    </div>
    <flow-box v-if="flowVisible" ref="FlowBox" @close="colseFlow" />
  </transition>
</template>
<script>
export { default } from './index.js'
</script>
<style scoped>
.el-time-spinner__wrapper {
  width: 100% !important;
}
/* @import url(index.scss); */
</style>
